Modeling

I am using a conditional binomial model to determine what factors impact movement decisions of territorial common ravens during the winter in Yellowstone. I will look at if various predictors impact if a raven decided to leaves its territory, and if it did, if it visit the Gardiner hunting region or not. The largest predictors here revolve around food availability of carrion created by human hunting activity and wolves.

There are two data sets, one for each part of the conditional model. The first one includes all of the days during the Yellowstone Wolf Project winter study periods (Nov 15- Dec 15 & Mar 1 - Mar 30) because my main predictor is the presence of wolf kills within a ravens territory and the carcass data is most reliable for that period of time due to GPS collar fix rates.
The second data set includes all winter from the start of the hunting season (varies by year, but always in the last week of October) to the end of March (end of late winter study). I can include these other periods because I am no longer considering wolf kills as a predictor because the raven at this point in the conditional model has already decided to leave its territory. This also allows me to have more data on days with low or no hunter gutpile availability from January and February.
For both data sets, all data points are excluded if that raven had less than 5 GPS points and the movement decisions was the negative for that binomial model (didn’t leaves its territory or didn’t visit the hunting area).

## dataset for part 1 of conditional model
ws_model_data <- read_csv(here("data", "clean", "commute_data.csv")) %>% 
  
  #restricting to only winter study months
  filter((paste(month, day, sep = "-") >= "11-15" &
            paste(month, day, sep = "-") <= "12-15") |
          (paste(month, day, sep = "-") >= "3-1" &
            paste(month, day, sep = "-") <= "3-30")) %>% 
  
  #removing days when there is less than 5 GPS point
  #unless the result is Jardine
  filter(!(n_point < 5 & terr_bin == F)) %>% 
  
  #only columns used in model
  dplyr::select(terr_bin, raven_id, rf_active_kill, bms_window_1, hunt_season, take_high_low, rf_avg_terr_kill_density, dist2nentrance,
                study_period, temp_max, snow_depth, prop_group_left_terr) %>% 
  
  #making sure rows are complete
  filter(complete.cases(.)) 
  

## dataset for part 2 of conditional model
hunt_model_data <- read_csv(here("data", "clean", "commute_data.csv")) %>%

  #only have days ravens decided to leave territory
  filter(terr_bin == 1) %>% 
  
  #removing days when there is less than 5 GPS point
  #unless the result is Jardine
  filter(!(n_point < 5 & hunt_bin == F)) %>% 
  
  
  #only columns used in model
  dplyr::select(hunt_bin, raven_id, bms_window_1, hunt_season, take_high_low, dist2nentrance, study_period, temp_max, snow_depth, prop_group_visit_hunt) %>% 
  
  #making sure rows are complete
  filter(complete.cases(.)) 

Part 1 of conditional model

The first part of the conditional model predicts if a raven will leaves it territory or not.

DEPENDENT VARIABLE
terr_bin
1 = left territory
0 = stayed on territory

I ended up trying a three different covariates to represent the hunting element of the model because I don’t know how ravens view the resource or the thresholds for availability that they consider viable. For examples, 10 and 15 kills are probably basically the same thing. Its a lot of potential food. But where is that line drawn. Is 1 and 5 different enough? What about 5 and 10? Or maybe 1 is all it takes. Or just hunters trying. It also allows for a little flexibility without the most precise daily data for hunting.

1. bms_window: The most specific is the a measure of the available biomass.

mod_terr_bms1 <- glmer(terr_bin ~ (1|raven_id) + rf_active_kill * scale(bms_window_1) + scale(rf_avg_terr_kill_density) + 
                         scale(dist2nentrance) + study_period * scale(temp_max) + scale(snow_depth) + scale(prop_group_left_terr),
                       data = ws_model_data,
                       family = "binomial",
                       nAGQ = 40,
                       control = cntrl)
summary(mod_terr_bms1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: terr_bin ~ (1 | raven_id) + rf_active_kill * scale(bms_window_1) +  
##     scale(rf_avg_terr_kill_density) + scale(dist2nentrance) +  
##     study_period * scale(temp_max) + scale(snow_depth) + scale(prop_group_left_terr)
##    Data: ws_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    1137.4    1203.3    -556.7    1113.4      1790 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -7.1126  0.1386  0.2226  0.3763  3.7325 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 2.028    1.424   
## Number of obs: 1802, groups:  raven_id, 20
## 
## Fixed effects:
##                                        Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                             2.88131    0.38452   7.493 6.71e-14 ***
## rf_active_killTRUE                     -0.99078    0.37465  -2.645  0.00818 ** 
## scale(bms_window_1)                    -0.09206    0.13096  -0.703  0.48205    
## scale(rf_avg_terr_kill_density)         0.40063    0.38877   1.031  0.30277    
## scale(dist2nentrance)                  -0.29363    0.36689  -0.800  0.42352    
## study_periodlate                       -0.57310    0.20294  -2.824  0.00474 ** 
## scale(temp_max)                        -0.18321    0.11411  -1.606  0.10838    
## scale(snow_depth)                       0.23833    0.13882   1.717  0.08601 .  
## scale(prop_group_left_terr)            -0.06791    0.09664  -0.703  0.48222    
## rf_active_killTRUE:scale(bms_window_1)  0.29844    0.29799   1.001  0.31659    
## study_periodlate:scale(temp_max)        0.05543    0.16587   0.334  0.73824    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) rf__TRUE s(__1) s(____ scl(2) stdy_p scl(t_) scl(s_) s(___)
## rf_ctv_TRUE  0.005                                                            
## scl(bms__1) -0.058 -0.054                                                     
## scl(rf____)  0.187 -0.009    0.023                                            
## scl(dst2nn)  0.077  0.022    0.052  0.083                                     
## study_prdlt -0.300 -0.121    0.121  0.003 -0.001                              
## scl(tmp_mx)  0.016 -0.013   -0.165 -0.014 -0.002 -0.075                       
## scl(snw_dp)  0.149  0.087   -0.613  0.001 -0.003 -0.512  0.225                
## scl(prp___) -0.040  0.017   -0.077  0.008 -0.039  0.153  0.070  -0.113        
## r__TRUE:(__ -0.005 -0.108   -0.228 -0.020 -0.014  0.061  0.009  -0.045   0.006
## stdy_pr:(_)  0.018  0.062    0.139  0.011  0.004 -0.142 -0.650  -0.008   0.033
##             r__TRUE:
## rf_ctv_TRUE         
## scl(bms__1)         
## scl(rf____)         
## scl(dst2nn)         
## study_prdlt         
## scl(tmp_mx)         
## scl(snw_dp)         
## scl(prp___)         
## r__TRUE:(__         
## stdy_pr:(_) -0.052
  1. hunt_season: The least specific is just whether it is within the hunting season
mod_terr_hseason <- glmer(terr_bin ~ (1|raven_id) + rf_active_kill * hunt_season + scale(rf_avg_terr_kill_density) + 
                            scale(dist2nentrance) + study_period * scale(temp_max) + scale(snow_depth) + scale(prop_group_left_terr),
                         data = ws_model_data,
                         family = "binomial",
                         nAGQ = 40,
                         control = cntrl)
summary(mod_terr_hseason)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## terr_bin ~ (1 | raven_id) + rf_active_kill * hunt_season + scale(rf_avg_terr_kill_density) +  
##     scale(dist2nentrance) + study_period * scale(temp_max) +  
##     scale(snow_depth) + scale(prop_group_left_terr)
##    Data: ws_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    1138.1    1204.0    -557.0    1114.1      1790 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -7.1242  0.1391  0.2237  0.3719  3.2319 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 1.979    1.407   
## Number of obs: 1802, groups:  raven_id, 20
## 
## Fixed effects:
##                                    Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                         2.81486    0.44744   6.291 3.15e-10 ***
## rf_active_killTRUE                 -1.89385    1.46694  -1.291  0.19670    
## hunt_seasonTRUE                     0.08573    0.31852   0.269  0.78780    
## scale(rf_avg_terr_kill_density)     0.41317    0.38467   1.074  0.28278    
## scale(dist2nentrance)              -0.28234    0.36275  -0.778  0.43637    
## study_periodlate                   -0.60506    0.21857  -2.768  0.00564 ** 
## scale(temp_max)                    -0.20334    0.11783  -1.726  0.08440 .  
## scale(snow_depth)                   0.20603    0.10679   1.929  0.05369 .  
## scale(prop_group_left_terr)        -0.06719    0.09664  -0.695  0.48691    
## rf_active_killTRUE:hunt_seasonTRUE  0.99883    1.50517   0.664  0.50694    
## study_periodlate:scale(temp_max)    0.08609    0.16754   0.514  0.60737    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) rf__TRUE h_TRUE s(____ scl(2) stdy_p scl(t_) scl(s_) s(___)
## rf_ctv_TRUE -0.098                                                            
## hnt_ssnTRUE -0.527  0.161                                                     
## scl(rf____)  0.162 -0.007   -0.006                                            
## scl(dst2nn)  0.068  0.014   -0.002  0.084                                     
## study_prdlt -0.020 -0.038   -0.403  0.004 -0.005                              
## scl(tmp_mx)  0.159 -0.040   -0.292 -0.009  0.007  0.072                       
## scl(snw_dp)  0.073  0.053    0.095  0.012  0.034 -0.535  0.125                
## scl(prp___) -0.020 -0.085   -0.030  0.010 -0.037  0.161  0.062  -0.216        
## r__TRUE:_TR  0.102 -0.969   -0.168  0.005 -0.007  0.017  0.034  -0.051   0.089
## stdy_pr:(_) -0.091  0.029    0.212  0.006 -0.004 -0.226 -0.666   0.107   0.037
##             r__TRUE:
## rf_ctv_TRUE         
## hnt_ssnTRUE         
## scl(rf____)         
## scl(dst2nn)         
## study_prdlt         
## scl(tmp_mx)         
## scl(snw_dp)         
## scl(prp___)         
## r__TRUE:_TR         
## stdy_pr:(_) -0.013
  1. take_high_low: in between the other 2, its a categorical variable with either high, low, or zero biomass availability.
mod_terr_hl <- glmer(terr_bin ~ (1|raven_id) + rf_active_kill * take_high_low + scale(rf_avg_terr_kill_density) + 
                            scale(dist2nentrance) + study_period  * scale(temp_max) + scale(snow_depth) + scale(prop_group_left_terr),
                     data = ws_model_data,
                     family = "binomial",
                     nAGQ = 40,
                     control = cntrl)
summary(mod_terr_hl)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: terr_bin ~ (1 | raven_id) + rf_active_kill * take_high_low +  
##     scale(rf_avg_terr_kill_density) + scale(dist2nentrance) +  
##     study_period * scale(temp_max) + scale(snow_depth) + scale(prop_group_left_terr)
##    Data: ws_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    1138.5    1215.5    -555.3    1110.5      1788 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -7.1986  0.1375  0.2231  0.3686  2.6212 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 2.022    1.422   
## Number of obs: 1802, groups:  raven_id, 20
## 
## Fixed effects:
##                                      Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                           2.60739    0.44241   5.894 3.78e-09 ***
## rf_active_killTRUE                   -1.22097    0.46979  -2.599  0.00935 ** 
## take_high_lowlow                      0.36468    0.26155   1.394  0.16323    
## take_high_lowzero                     0.26100    0.39265   0.665  0.50624    
## scale(rf_avg_terr_kill_density)       0.42870    0.38864   1.103  0.26999    
## scale(dist2nentrance)                -0.26472    0.36674  -0.722  0.47041    
## study_periodlate                     -0.44324    0.25097  -1.766  0.07738 .  
## scale(temp_max)                      -0.18723    0.11802  -1.586  0.11264    
## scale(snow_depth)                     0.30538    0.12153   2.513  0.01198 *  
## scale(prop_group_left_terr)          -0.05587    0.09727  -0.574  0.56573    
## rf_active_killTRUE:take_high_lowlow   0.79716    0.76653   1.040  0.29836    
## rf_active_killTRUE:take_high_lowzero -0.67626    1.52699  -0.443  0.65786    
## study_periodlate:scale(temp_max)      0.08134    0.17060   0.477  0.63353    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

All 3 models are pretty competitive.

AIC(mod_terr_bms1) #equally good
## [1] 1137.357
AIC(mod_terr_hseason) #equally good
## [1] 1138.087
AIC(mod_terr_hl)
## [1] 1138.526

It actually didn’t matter which hunting covariate I used because they were all not significant. Instead, as expected, in most of the models the presence of an active kill within 1 km of a ravens territory lead to less chance of the raven leaving its territory. The interaction term in all 3 models was not significant, meaning that the presence of an active kill did not change the impact hunter gutpile availability had on raven movement.
The binary hunting season covariate in the second model did lead to a change in the significance of the active kill covariate. This is because the added interaction term (with active wolf kill) had a high standard error, even though the effect size and direction were basically the same.
The average kill density in a ravens territory did not impact movement decisions. So they don’t consider the past or prior knowledge of their territory and are only responding to more immediate stimuli. This makes sense when considering that a high productivity territory is still unlikely to have a kill made each day. Then their response to no immediate kills in their territory is to leave, which is still a gamble since you don’t know what the food situation will be like in Gardiner or elsewhere; however, in most cases those human sites will still be less of a gamble than a raven in a high productivity territory.
The study period being early or late winter has a negative effect in the late winter in all 3 of the models (even though it isn’t significant in model 3), which follows my prediction about how pre-breeding behaviors would impact raven movement by keeping them on territory more often.
The maximum daily temperature had a negative effect in all three models, although it was borderline in 2 of the models. Higher temperatures lowered the chance of a raven leaving its territory. A good reason for this might be that the colder days require more energy to maintain body temperature, so a more guaranteed food sources is taken. Then on warmer days when temperature regulation is easier, they don’t risk as much by staying on their territory. An interaction between temperature and study period was tested to tell if ravens were influenced by temperature differently at different times of year and the effect was insignificant and is not included here.
Snow depth had the same effect found from the Walker et al. study that greater snow depth increased the chances of the raven being in anthropogenic hunting areas (leaving their territory). This isn’t a perfect conclusion though because even though they leave their territory, they could still be staying in the national park. However, it does agree with the alternative logic that higher snow depth leads to ungulate migration and more potential hunting availability. So this might be a cue that they are not following or attempting to gain knowledge about actual hunting availability (hence a lack of effect for the actual hunting covariate) and are instead following proxies for it. snow depth and the hunting biomass coavriates have a high correlation in the model output. This is likely because the biomass calculation takes into account elk migration timing, which is heavily influenced by snow depth.
One super interesting thing to note is that I ran this model with the group travel covariate before adding the temperature, and the group travel stopped being significant after the addition of the temperature. So it would seem like they don’t take into account the other ravens that much and instead are all responding to the same stimuli.
Here is the bootstrapped parameter confidence intervals for model 1 using the biomass estimate as the hunting covariate.

Part 2 of conditional model

The second part of the conditional model predicts if, when a raven left its territory, if it visited the Gardiner hunting region.

DEPENDENT VARIABLE
hunt_bin
1 = visited hunting
0 = visited other place

Again, I compared models using the same three hunting covariates. However, this time I removed the wolf kill and study period covariates.
I don’t consider wolf kills anymore because, at this point in the model, the raven has already left its territory. It is true that a raven could travel to a wolf kill outside of its territory, but I am interested in the decision to travel to the Gardiner hunting region, so those other options don’t matter as much. That includes other cities and towns. This part of the conditional model acknowledges their presence, but isn’t really interested in them specifically.
I don’t consider study period anymore because, again, in this part of the conditional model the raven has already decided to leave its territory. The breeding behavior hypothesis was that ravens would want to stay on their territory more during late winter to perform breeding behaviors. This doesn’t matter anymore here.

1. bms_window: The most specific is the a measure of the available biomass.

mod_hunt_bms1 <- glmer(hunt_bin ~ (1|raven_id) + scale(bms_window_1) + scale(dist2nentrance) + 
                         scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth),
                       data = hunt_model_data,
                       family = "binomial",
                       nAGQ = 40,
                       control = cntrl)
summary(mod_hunt_bms1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## hunt_bin ~ (1 | raven_id) + scale(bms_window_1) + scale(dist2nentrance) +  
##     scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth)
##    Data: hunt_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    3481.0    3524.9   -1733.5    3467.0      3904 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -12.5605  -0.1822   0.2984   0.5594   3.1345 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 3.834    1.958   
## Number of obs: 3911, groups:  raven_id, 20
## 
## Fixed effects:
##                              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                   0.46902    0.46927   0.999  0.31757    
## scale(bms_window_1)           0.60513    0.10813   5.597 2.19e-08 ***
## scale(dist2nentrance)        -2.15348    0.50516  -4.263 2.02e-05 ***
## scale(prop_group_visit_hunt)  0.50689    0.05041  10.055  < 2e-16 ***
## scale(temp_max)              -0.27843    0.04717  -5.902 3.58e-09 ***
## scale(snow_depth)            -0.13865    0.05102  -2.718  0.00658 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) s(__1) scl(2) s(___) scl(t_)
## scl(bms__1)  0.015                             
## scl(dst2nn)  0.059 -0.068                      
## scl(prp___)  0.007 -0.315 -0.016               
## scl(tmp_mx) -0.014 -0.200  0.018  0.143        
## scl(snw_dp) -0.013 -0.045 -0.012  0.036  0.396
  1. hunt_season: The least specific is just whether it is within the hunting season
mod_hunt_hseason <- glmer(hunt_bin ~ (1|raven_id) + hunt_season + scale(dist2nentrance) + 
                            scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth),
                          data = hunt_model_data,
                          family = "binomial",
                          nAGQ = 40,
                          control = cntrl)
summary(mod_hunt_hseason)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: hunt_bin ~ (1 | raven_id) + hunt_season + scale(dist2nentrance) +  
##     scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth)
##    Data: hunt_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    3463.7    3507.6   -1724.9    3449.7      3904 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -7.7099 -0.1474  0.2925  0.5361  2.9754 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 3.548    1.884   
## Number of obs: 3911, groups:  raven_id, 20
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                   0.085022   0.453716   0.187    0.851    
## hunt_seasonTRUE               0.804120   0.102174   7.870 3.54e-15 ***
## scale(dist2nentrance)        -2.128294   0.485719  -4.382 1.18e-05 ***
## scale(prop_group_visit_hunt)  0.470581   0.051169   9.197  < 2e-16 ***
## scale(temp_max)              -0.315563   0.048724  -6.477 9.38e-11 ***
## scale(snow_depth)            -0.006388   0.051114  -0.125    0.901    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) h_TRUE scl(2) s(___) scl(t_)
## hnt_ssnTRUE -0.093                             
## scl(dst2nn)  0.067 -0.021                      
## scl(prp___)  0.044 -0.354 -0.025               
## scl(tmp_mx)  0.015 -0.274  0.017  0.165        
## scl(snw_dp) -0.027  0.175 -0.006 -0.063  0.322
  1. take_high_low: in between the other 2, its a categorical variable with either high, low, or zero biomass availability.
mod_hunt_hl <- glmer(hunt_bin ~ (1|raven_id) + take_high_low + scale(dist2nentrance) + 
                            scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth),
                     data = hunt_model_data,
                     family = "binomial",                       
                     nAGQ = 40,
                     control = cntrl)
summary(mod_hunt_hl)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 40) [glmerMod]
##  Family: binomial  ( logit )
## Formula: hunt_bin ~ (1 | raven_id) + take_high_low + scale(dist2nentrance) +  
##     scale(prop_group_visit_hunt) + scale(temp_max) + scale(snow_depth)
##    Data: hunt_model_data
## Control: cntrl
## 
##       AIC       BIC    logLik -2*log(L)  df.resid 
##    3462.7    3512.9   -1723.3    3446.7      3903 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.9852 -0.1466  0.2924  0.5393  2.9563 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  raven_id (Intercept) 3.579    1.892   
## Number of obs: 3911, groups:  raven_id, 20
## 
## Fixed effects:
##                              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                   1.09745    0.46733   2.348   0.0189 *  
## take_high_lowlow             -0.38472    0.16680  -2.306   0.0211 *  
## take_high_lowzero            -1.00728    0.14107  -7.140 9.31e-13 ***
## scale(dist2nentrance)        -2.14450    0.48788  -4.396 1.10e-05 ***
## scale(prop_group_visit_hunt)  0.46171    0.05127   9.006  < 2e-16 ***
## scale(temp_max)              -0.33422    0.04959  -6.740 1.58e-11 ***
## scale(snow_depth)            -0.06928    0.05765  -1.202   0.2294    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) tk_hgh_lwl tk_hgh_lwz scl(2) s(___) scl(t_)
## tk_hgh_lwlw -0.203                                            
## tk_hgh_lwzr -0.233  0.688                                     
## scl(dst2nn)  0.057  0.018      0.028                          
## scl(prp___) -0.052  0.084      0.313     -0.023               
## scl(tmp_mx) -0.082  0.193      0.318      0.019  0.177        
## scl(snw_dp) -0.079  0.454      0.187      0.002 -0.017  0.373

Of the 3 models, the hunting season and high/low hunting predictors are equal.

AIC(mod_hunt_bms1)
## [1] 3480.992
AIC(mod_hunt_hseason) #equally good
## [1] 3463.712
AIC(mod_hunt_hl) #equally good
## [1] 3462.684

In all of the models the hunting covariate was significant and followed the trend of more hunting, more likely the raven is to visit the hunting area.
The distance to the hunting area was also always significant with ravens holding territories closer to the hunting area visiting more frequently. Makes sense that the less time and energy it takes to get there makes it more worth checking out the area. For some ravens that are really close, it also gives them the advantage of potentially being able to hear gunshots that indicate potential hunter success.
The proportion of other ravens that are visiting the hunting area has a positive effect. When considered in conjunction with the effect of the group covariate in part 1 of the conditional model: ravens aren’t influenced by other ravens when deciding to leave their territory; however, if they do choose to leave they are often visiting the same destinations as the rest of the ravens that leave their territories. So if they choose to leave, which is a decision based on abiotic factors like weather and available local food, they are utilizing social cues and shared information.
The maximum daily temperature had a negative effect in all three models, lowering the chance of a raven visiting the hunting area if it decided to leave its territory during warmer weather.
The effect of snow depth is uncertain from these models. Only model 1 found a significant effect and the other two models were not significant with different effect directions (although both almost 0).
Here is the bootstrapped parameter confidence intervals for model 1 using the biomass estimate as the hunting covariate.

Figures

Here is a table that shows the number of times raven made each decision. Beth had the idea to make some kind of heat map similar to the map below that has individual examples of ravens GPS points, but for raven decisions. This would be so there was some, more easily understandable (the giant mass of GPS points is hard to comprehend and compare), visual example. The Gardiner hunting region and the territory would be heat map areas and then the times that the raven left its territory but didn’t go to Gardiner would leave the GPS points like map 1.B. This would mean that you could only have 1 raven per map so that the heat map reflected that individuals decisions.

(raven_decisions <- read_csv(here("data",  "clean", "commute_data.csv")) %>%
   group_by(raven_id) %>% 
   summarize(terr = sum(terr_bin == FALSE),
             other = sum(terr_bin == TRUE & hunt_bin == FALSE),
             hunt = sum(hunt_bin == TRUE)) %>% 
  # adding column for total sample size for each raven
   mutate(n = hunt + other + terr))
## # A tibble: 20 × 5
##    raven_id  terr other  hunt     n
##    <chr>    <int> <int> <int> <int>
##  1 7484        62     8    64   134
##  2 7485       108   220     0   328
##  3 7489        51   155   275   481
##  4 7489_2      23    14    24    61
##  5 7490_3      89    84   239   412
##  6 7492        92   144   325   561
##  7 7493_2      63    48     1   112
##  8 7494       407   184     0   591
##  9 7495        17    19   115   151
## 10 7530       238    50   441   729
## 11 7531        65    81   116   262
## 12 7561        99   194   189   482
## 13 7565        85   111     9   205
## 14 7595        38   160   149   347
## 15 7640_3      95    69   289   453
## 16 7652_2      38    47   140   225
## 17 7665        49   156   247   452
## 18 7672       114    36    98   248
## 19 8900        10    37    77   124
## 20 8902         5     3     1     9

But I think an even better option would be a bar chart with 3 levels showing the proportion of days making whatever decisions (similar to how we handled the raven foraging).
Here is an visual example of three different ravens with territories at different distances from the Gardiner hunting region area and their GPS points.
Of the three ravens, the orange raven with its territory at Old Faithful is the only one that doesn’t visit the hunting area which is why it looks the same in both maps. Instead, its trips are consistently to the closer town of West Yellowstone, presumably to feed on human refuse. It probably makes this decision because the time investment to travel up to the Gardiner hunting region is not worth it when an alternative location with consistent foraging is nearby. Even though purple is a similar distance to West Yellowstone where orange visits frequently, it chooses to travel to the north instead. It probably makes this choice because unlike orange, the time investment is about the same between the two locations. And Gardiner has a much higher level of hunting offering a potentially better foraging opportunity while also have human refuse as a back up. Almost all trips north for purple resulted in a visit to the Gardiner hunting region, and the few remaining points up north are probably because of a missed fix in the hunting area.Most of the time when the purple chooses to leave its territory, but not visit the Gardiner hunting region, it is actually still hanging out around its territory but just outside of the 1 kilometer around the 90% minimum convex polygon I am currently considering their territory. Green is so close to the Gardiner hunting region that it only makes sense that it visits so often, given that the flight time for that trip is less than 30 minutes. On days that it leaves its territory but does not visit the Gardiner hunting region it visits various areas in the northern range inside the park and even ventures eastward a few times during October before it gets too cold. One super interesting thing to note is that you would think that there would be more obvious instances of ravens visiting wolf kills outside their territories which would show up as small concentrations of GPS points in map B. However, this almost never occurs, or at least isn’t obvious. I think this is because either the carcass is close enough to their territory that I still consider the raven as having not left. Or, ravens will frequently visit wolf kills outside their territory, followed by a trip to the Gardiner hunting area. This second explanation actually lines up with some of my experiences seeing a group of ravens fly into a carcass sometime in the morning, only to leave not long after. I look into this a farther down using some tables.
Map A shows the all GPS points made by each of the three ravens. Map B shows the GPS points for the three ravens when they choose to exit their territories (highlighted in red), but did not visit the Gardiner hunting region.


Here is a heat map of the raven GPS points outside the park from November and March along with a polygon denoting the area used to determine if a raven attempted to search for hunter created resources during the MTFWP rifle hunting season and the tribal bison hunt (hereafter Gardiner hunting region). The Gardiner hunting region is defined as the space 5 km from all roads within 10 km north of the national park boundary. This space has a high density of hunting activity in close proximity to the northern range of the park. The 5 km buffer around roads was used as a reasonable distance for a hunter to travel. There is certainly successful hunting attempts in the areas outside this polygon, but the relative number of those will be low compared to hunting within the polygon.
This polygon does include the town of Gardiner along with the local landfill and water treatment ponds that ravens have been documented using as locations to forage since I made the assumption that a raven visiting this area would always attempt to find hunter offal, even if unsuccessful. Only 26% of trips to the Gardiner hunting region during the hunting season resulted in a trip to the landfill and water treatment pond.

Here is a map of the relevant polygons used including the study area of Yellowstone National Park, the northern range of Yellowstone, and raven territories calculated using 90% minimum convex polygons of their breeding season GPS data. All raven used for this study have territories within the boundary of the national park. In 2 cases where a territorial pair had both individuals GPS tagged, only the female was used since the GPS fix rate was higher due to better battery levels resulting from less coverage of the solar panel during the winter.
## Wolf kill visits I looked at how often ravens were visiting wolf kills when they left their territory because it looked like they didn’t visit kills that often when they left their territory but didn’t visit the Gardiner hunting region (map 1.B).

source(here("scripts", "exploratory", "wolf_kill_visits.R"))
## Warning: One or more parsing issues, call `problems()` on your data frame for details,
## e.g.:
##   dat <- vroom(...)
##   problems(dat)
#table for days visiting wolf kills with no hunting visit
leave_no_hunt_wolf_kills
## # A tibble: 10 × 4
##    raven_id days_visit total_days prop_visit
##    <chr>         <int>      <int>      <dbl>
##  1 7490_3            6         27     0.222 
##  2 7492              3         63     0.0476
##  3 7531              7         39     0.179 
##  4 7561             21        133     0.158 
##  5 7595             13        126     0.103 
##  6 7640_3            6         36     0.167 
##  7 7652_2            1         21     0.0476
##  8 7665              9         98     0.0918
##  9 8900              1         12     0.0833
## 10 8902              1          3     0.333
# table for days visiting wolf kills with hunting visit
hunt_wolf_kills
## # A tibble: 16 × 4
##    raven_id days_visit total_days prop_visit
##    <chr>         <int>      <int>      <dbl>
##  1 7484             11         63     0.175 
##  2 7489             16        257     0.0623
##  3 7490_3           11        152     0.0724
##  4 7492             17        248     0.0685
##  5 7495              4        108     0.0370
##  6 7530             20        378     0.0529
##  7 7531             15        100     0.15  
##  8 7561              9        142     0.0634
##  9 7565              3          6     0.5   
## 10 7595              7        132     0.0530
## 11 7640_3            6        176     0.0341
## 12 7652_2           10         84     0.119 
## 13 7665             11        207     0.0531
## 14 7672              7         68     0.103 
## 15 8900              8         33     0.242 
## 16 8902              1          1     1

It looks like wolf kill visits are not a large portion of trips outside of the territory, regardless of if the raven ends up in the Gardiner hunting region or not. This tracks with the foraging paper and the relative importance of natural carrion to anthropogenic resources used by most ravens. It is worth noting that a fair number of times ravens do visit wolf kills before preceding to search for hunter gutpiles.